<div class="layui-fluid layui-anim febs-anim" id="shellSiteInfo-add" lay-title="壳牌油站其它信息">
    <div class="layui-row layui-col-space8 febs-container">
    	<form class="layui-form" action="" lay-filter="febs-form-elements" id="shellSiteInfoAdd">
    	<div class="layui-col-lg30" style="margin:3px;" th:each="ssil1:${listssil1}" lay-filter="oilInfo">
        	<div class="layui-card ">
                <div class="layui-card-header layui-bg-blue layui-col-md9">[[${ssil1.dictSite.dictName}]]</div>
                <div class="layui-card-header layui-bg-blue layui-col-md3" shiro:hasPermission="shelloil:add"><a th:onclick="addSiteOilInfo([[${siteid}]],[[${ssil1.dictSite.did}]],[[${ssil1.dictSite.dictName}]])" ><i class="layui-icon" style="color: #FFF;">&#xe642;</i></a></div>
                <div class="layui-card-body layui-clear" >
	                <div class="layui-row layui-bg-gray">
	                	<div class="layui-col-md4 laytable-cell-space">
	                			开始日期
						</div>        
						<div class="layui-col-md2 laytable-cell-space">
								92#
						</div>
						<div class="layui-col-md2 laytable-cell-space">
								95#
						</div>
						<div class="layui-col-md2 laytable-cell-space">
								0#
						</div>
						<div class="layui-col-md2 laytable-cell-space">
						</div>
	                </div>
                	<div class="layui-row layui-col-space10 layui-form-item" th:each="so:${ssil1.listsso}">
						<div class="layui-col-md4 laytable-cell-space" th:text="${so.startDate}">
						</div>        
						<div class="layui-col-md2 laytable-cell-space">
							[[${so.oil92}]]
						</div>
						<div class="layui-col-md2 laytable-cell-space">
							[[${so.oil95}]]
						</div>
						<div class="layui-col-md2 laytable-cell-space">
							[[${so.oil0}]]
						</div>
						<div class="layui-col-md2 laytable-cell-space" shiro:hasPermission="shelloil:delete">
							<a th:onclick="deleteOilInfo([[${so.id}]])" lay-event="delInfo"><i class="layui-icon">&#xe640;</i></a>
						</div>
					</div>
                </div>
            </div>
         </div>
         <div class="layui-col-lg30" style="margin:3px;" th:each="ssil2:${listssil2}">
            <div class="layui-card">
            	<div class="layui-card-header layui-bg-blue layui-col-md9">[[${ssil2.dictSite.dictName}]]</div>
            	<div class="layui-card-header layui-bg-blue layui-col-md3" shiro:hasPermission="shellinfo:add"><a th:onclick="addSiteInfo([[${siteid}]],[[${ssil2.dictSite.did}]],[[${ssil2.dictSite.dictName}]])" lay-event="editInfo"><i class="layui-icon" style="color: #FFF;">&#xe642;</i></a></div>
	            	<div class="layui-card-body layui-clear">
		            	<div class="layui-row layui-bg-gray">
		                	<div class="layui-col-md5 laytable-cell-space">
		                			开始日期
							</div>        
							<div class="layui-col-md5 laytable-cell-space">
									全部油品
							</div>
							<div class="layui-col-md2 laytable-cell-space">
							</div>
		                </div>
	                    <div class="layui-row layui-col-space10 layui-form-item" th:each="si:${ssil2.listssi}">
							<div class="layui-col-md5 laytable-cell-space" th:text="${si.startDate}">
							</div>    
							<div class="layui-col-md5 laytable-cell-space">
								[[${si.infoValue}]]
							</div>
							<div class="layui-col-md2 laytable-cell-space" shiro:hasPermission="shellinfo:add">
								<a th:onclick="deleteSiteInfo([[${siteid}]],[[${si.id}]])" lay-event="delInfo"><i class="layui-icon">&#xe640;</i></a>
							</div>
						</div>
	                </div>
            	</div>
        </div>
       </form> 
     </div>
</div>

<script>
    layui.use(['febs', 'form', 'laydate'], function () {
        var $ = layui.$,
            febs = layui.febs,
            element = layui.element,
            layer = layui.layer,
            laydate = layui.laydate,
            $view = $('#shellSiteInfo-add'),
            $reset = $view.find('#reset'),
            form = layui.form;
        

        
        window.addSiteOilInfo=function(siteid,did,dictname) {
        	febs.modal.open('新增'+ dictname +'信息', 'site/shell/oilinfoadd/' + siteid + '/' + did, {
        		btn: ['提交', '重置'],
                area: $(window).width() <= 750 ? '45%' : '45%',
                yes: function (index, layero) {
                    $('#siteOilInfo-add').find('#oilInfosubmit').trigger('click');
                },
                btn2: function () {
                    $('#siteOilInfo-add').find('#reset').trigger('click');
                    return false;
                }
            });
        }
        
        window.addSiteInfo=function(siteid,did,dictname) {
        	febs.modal.open('新增'+ dictname +'信息', 'site/shell/infoadd/' + siteid + '/' + did, {
        		btn: ['提交', '重置'],
                area: $(window).width() <= 750 ? '40%' : '40%',
                yes: function (index, layero) {
                    $('#siteInfo-add').find('#siteInfosubmit').trigger('click');
                },
                btn2: function () {
                    $('#siteInfo-add').find('#reset').trigger('click');
                    return false;
                }
            });
        }
        
        window.deleteOilInfo=function(id) {
        	febs.get(ctx + 'shelloil/delete/' + id, null, function () {
                febs.alert.success('删除信息成功');
                $query.click();
            });
        }
        
        window.deleteShellInfo=function(id) {
        	febs.get(ctx + 'shellinfo/delete/' + id, null, function () {
                febs.alert.success('删除信息成功');
                $query.click();
            });
        }
    })
</script>